package cn.controller.marketing;

import cn.service.marketingService.MarketingServiceImpl.SpecialMarketingServiceImpl;
import entity.Result;
import entity.marketingEntity.SpecialMarketingCondition;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 朱颢阳
 * @description
 * @time 2024/8/30 11:53
 */
@RestController
@CrossOrigin
@RequestMapping("/marketing")
public class SpecialMarketingController {
    @Autowired
    SpecialMarketingServiceImpl service;
    @RequestMapping("/getSpecialMarking")
    public Result getSpecialMarking(@RequestBody SpecialMarketingCondition condition){
        return service.getSpecialMarking(condition);
    }
    @RequestMapping("/updateSpecialMarkingRecommend")
    public Result updateSpecialMarkingRecommend(Integer id,Integer recommend){
        return service.updateSpecialMarkingRecommend(id,recommend);
    }
    @RequestMapping("/updateSpecialMarkingSort")
    public Result updateSpecialMarkingSort(Integer id,Integer sort){
        return service.updateSpecialMarkingSort(id,sort);
    }
    @RequestMapping("/addSpecialMarketing")
    public Result addSpecialMarketing(@RequestBody List<String> list){
        return service.addSpecialMarketing(list);
    }
    @RequestMapping("/deleteSpecialMarketing")
    public Result deleteSpecialMarketing(Integer id){
        return service.deleteSpecialMarketing(id);
    }
}
